1. Field of the Invention
The present invention relates generally to data processing environments and, more particularly, to a system providing methodology for data exchange and exception handling in a data processing environment.
2. Background Art
The ADOBE® FLEX® software development kit, and BlazeDS server-based Java web components from Adobe Systems, Inc. are considered to provide significant advances in client-server technology. In a multi-tier web application, in which the client is written in ADOBE® FLEX® and the server is written in Java, two-way data exchange, along with exception handling, between client and server is crucial. There are two well-known ways to exchange data between server-side Java and client-side FLEX®. In one approach, data is represented as an XML string, providing the capability of inter-language data exchange. Unfortunately, extra computing cycles are needed to convert an object to XML, and the XML to an object.
Alternatively, the FLEX® framework's Remote Object service can be used to expose a server-side Java object as a RemoteObject, which contains public methods that can be called from a client-side FLEX® application. Data is represented as a Java object on the server side and corresponding ActionScript object on the client side. This FLEX® RemoteObject approach has at least two drawbacks. One drawback is the need to create various classes that extend the FLEX® RemoteObject on both the server and the client side. Also, “Class cast exception” is a common problem that occurs on the FLEX® side when the RemoteObject approach is used, if the same RemoteObject class is instantiated in multiple application domains. An additional drawback occurs as a result of a server-side Java method throwing an exception. When the FLEX® client catches the exception, it gets a FaultEvent object that may contain a stack of nested exceptions. It's very hard to parse the exception stack to extract pertinent error message for display of the error message in a user interface (UI). When the exception stack is deep, it is very difficult to parse it and obtain the real root cause of the exception.
Thus, the known approaches do not provide a simple, yet flexible, mechanism to exchange data both ways between a FLEX®-capable client and a Java-capable server. Further, a robust exception handling system is lacking that smoothly handles exceptions thrown from server to client and overcomes the shortcoming of error handling in the FLEX® programming language. Accordingly, the present invention provides solutions that address such needs.